

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>5.2. Base classes — MDAnalysis.coordinates.base &mdash; MDAnalysis v0.7.5-devel documentation</title>
    <link rel="stylesheet" href="../../_static/sphinxdoc.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '0.7.5-devel',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within MDAnalysis v0.7.5-devel documentation"
          href="../../_static/opensearch.xml"/>
    <link rel="shortcut icon" href="../../_static/mdanalysis-logo.ico"/>
    <link rel="top" title="MDAnalysis v0.7.5-devel documentation" href="../../index.html" />
    <link rel="up" title="5. Coordinates modules" href="../coordinates_modules.html" />
    <link rel="next" title="5.3. Common functions for coordinate reading — MDAnalysis.coordinates.core" href="core.html" />
    <link rel="prev" title="5.1. Coordinate/Trajectory Readers and Writers — MDAnalysis.coordinates" href="init.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="core.html" title="5.3. Common functions for coordinate reading — MDAnalysis.coordinates.core"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="init.html" title="5.1. Coordinate/Trajectory Readers and Writers — MDAnalysis.coordinates"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">MDAnalysis v0.7.5-devel documentation</a> &raquo;</li>
          <li><a href="../coordinates_modules.html" accesskey="U">5. Coordinates modules</a> &raquo;</li> 
      </ul>
    </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../index.html">
              <img class="logo" src="../../_static/mdanalysis-logo-200x150.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="init.html"
                        title="previous chapter">5.1. Coordinate/Trajectory Readers and Writers  &#8212; <tt class="docutils literal"><span class="pre">MDAnalysis.coordinates</span></tt></a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="core.html"
                        title="next chapter">5.3. Common functions for coordinate reading &#8212; <tt class="docutils literal"><span class="pre">MDAnalysis.coordinates.core</span></tt></a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/documentation_pages/coordinates/base.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <span class="target" id="module-MDAnalysis.coordinates.base"></span><div class="section" id="base-classes-mdanalysis-coordinates-base">
<h1>5.2. Base classes &#8212; <a class="reference internal" href="#module-MDAnalysis.coordinates.base" title="MDAnalysis.coordinates.base"><tt class="xref py py-mod docutils literal"><span class="pre">MDAnalysis.coordinates.base</span></tt></a><a class="headerlink" href="#base-classes-mdanalysis-coordinates-base" title="Permalink to this headline">¶</a></h1>
<p>Derive other Reader and Writer classes from the classes in this
module. The derived classes must follow the Trajectory API in
<a class="reference internal" href="init.html#module-MDAnalysis.coordinates.__init__" title="MDAnalysis.coordinates.__init__"><tt class="xref py py-mod docutils literal"><span class="pre">MDAnalysis.coordinates.__init__</span></tt></a>.</p>
<dl class="class">
<dt id="MDAnalysis.coordinates.base.Timestep">
<em class="property">class </em><tt class="descclassname">MDAnalysis.coordinates.base.</tt><tt class="descname">Timestep</tt><big>(</big><em>arg</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.Timestep" title="Permalink to this definition">¶</a></dt>
<dd><p>Timestep data for one frame</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Attributes :</th><td class="field-body"><dl class="first docutils">
<dt><tt class="xref py py-attr docutils literal"><span class="pre">numatoms</span></tt></dt>
<dd><p class="first last">number of atoms</p>
</dd>
<dt><tt class="xref py py-attr docutils literal"><span class="pre">frame</span></tt></dt>
<dd><p class="first last">frame number</p>
</dd>
<dt><tt class="xref py py-attr docutils literal"><span class="pre">_pos</span></tt></dt>
<dd><p class="first">coordinates as a (<em>numatoms</em>,3) <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.0.dev-4fb84e7)"><tt class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></tt></a> of dtype
<tt class="xref py py-data docutils literal"><span class="pre">float32</span></tt>.</p>
<div class="last admonition note">
<p class="first admonition-title">Note</p>
<p class="last">normally one does not directly access <tt class="xref py py-attr docutils literal"><span class="pre">_pos</span></tt> but uses the
<a class="reference internal" href="../core/AtomGroup.html#MDAnalysis.core.AtomGroup.AtomGroup.coordinates" title="MDAnalysis.core.AtomGroup.AtomGroup.coordinates"><tt class="xref py py-meth docutils literal"><span class="pre">coordinates()</span></tt></a> method of
an <a class="reference internal" href="../core/AtomGroup.html#MDAnalysis.core.AtomGroup.AtomGroup" title="MDAnalysis.core.AtomGroup.AtomGroup"><tt class="xref py py-meth docutils literal"><span class="pre">AtomGroup()</span></tt></a> but sometimes it can
be faster to directly use the raw coordinates. Any changes to this
array are imediately reflected in atom positions. If the frame is
written to a new trajectory then the coordinates are changed. If a
new trajectory frame is loaded, then <em>all</em> contents of <tt class="xref py py-attr docutils literal"><span class="pre">_pos</span></tt>
are overwritten.</p>
</div>
</dd>
<dt><a class="reference internal" href="#MDAnalysis.coordinates.base.Timestep.dimensions" title="MDAnalysis.coordinates.base.Timestep.dimensions"><tt class="xref py py-attr docutils literal"><span class="pre">dimensions</span></tt></a>:</dt>
<dd><p class="first last">system box dimensions (A, B, C, alpha, beta, gamma); lengths
are in the MDAnalysis length unit, and angles are in degrees.</p>
</dd>
</dl>
</td>
</tr>
<tr class="field"><th class="field-name">Methods :</th><td class="field-body"><dl class="first last docutils">
<dt><tt class="docutils literal"><span class="pre">t</span> <span class="pre">=</span> <span class="pre">Timestep(numatoms)</span></tt></dt>
<dd><p class="first last">create a timestep object with space for numatoms (done automatically)</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">t[i]</span></tt></dt>
<dd><p class="first last">return coordinates for the i&#8217;th atom (0-based)</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">t[start:stop:skip]</span></tt></dt>
<dd><p class="first last">return an array of coordinates, where start, stop and skip correspond to atom indices (0-based)</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="MDAnalysis.coordinates.base.Timestep.dimensions">
<tt class="descname">dimensions</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.Timestep.dimensions" title="Permalink to this definition">¶</a></dt>
<dd><p>unitcell dimensions (A, B, C, alpha, beta, gamma)</p>
</dd></dl>

<dl class="attribute">
<dt id="MDAnalysis.coordinates.base.Timestep.volume">
<tt class="descname">volume</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.Timestep.volume" title="Permalink to this definition">¶</a></dt>
<dd><p>volume of the unitcell</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="MDAnalysis.coordinates.base.IObase">
<em class="property">class </em><tt class="descclassname">MDAnalysis.coordinates.base.</tt><tt class="descname">IObase</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.IObase" title="Permalink to this definition">¶</a></dt>
<dd><p>Base class bundling common functionality for trajectory I/O.</p>
<dl class="method">
<dt id="MDAnalysis.coordinates.base.IObase.close">
<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.IObase.close" title="Permalink to this definition">¶</a></dt>
<dd><p>Close the trajectory file.</p>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.base.IObase.close_trajectory">
<tt class="descname">close_trajectory</tt><big>(</big><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.IObase.close_trajectory" title="Permalink to this definition">¶</a></dt>
<dd><p>Specific implementation of trajectory closing.</p>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.base.IObase.convert_pos_from_native">
<tt class="descname">convert_pos_from_native</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.IObase.convert_pos_from_native" title="Permalink to this definition">¶</a></dt>
<dd><p>In-place conversion of coordinate array x from native units to base units.</p>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.base.IObase.convert_pos_to_native">
<tt class="descname">convert_pos_to_native</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.IObase.convert_pos_to_native" title="Permalink to this definition">¶</a></dt>
<dd><p>In-place conversion of coordinate array x from base units to native units.</p>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.base.IObase.convert_time_from_native">
<tt class="descname">convert_time_from_native</tt><big>(</big><em>t</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.IObase.convert_time_from_native" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert time <em>t</em> from native units to base units.</p>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.base.IObase.convert_time_to_native">
<tt class="descname">convert_time_to_native</tt><big>(</big><em>t</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.IObase.convert_time_to_native" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert time <em>t</em> from base units to native units.</p>
</dd></dl>

<dl class="attribute">
<dt id="MDAnalysis.coordinates.base.IObase.format">
<tt class="descname">format</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.IObase.format" title="Permalink to this definition">¶</a></dt>
<dd><p>override to define trajectory format of the reader/writer (DCD, XTC, ...)</p>
</dd></dl>

<dl class="attribute">
<dt id="MDAnalysis.coordinates.base.IObase.units">
<tt class="descname">units</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.IObase.units" title="Permalink to this definition">¶</a></dt>
<dd><p>dict with units of of <em>time</em> and <em>length</em> (and <em>velocity</em>, <em>force</em>,
... for formats that support it)</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="MDAnalysis.coordinates.base.Reader">
<em class="property">class </em><tt class="descclassname">MDAnalysis.coordinates.base.</tt><tt class="descname">Reader</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.Reader" title="Permalink to this definition">¶</a></dt>
<dd><p>Base class for trajectory readers.</p>
<p>See the <a class="reference internal" href="init.html#trajectory-api"><em>Trajectory API</em></a> definition in
<a class="reference internal" href="init.html#module-MDAnalysis.coordinates.__init__" title="MDAnalysis.coordinates.__init__"><tt class="xref py py-mod docutils literal"><span class="pre">MDAnalysis.coordinates.__init__</span></tt></a> for the required attributes and methods.</p>
<dl class="method">
<dt id="MDAnalysis.coordinates.base.Reader.OtherWriter">
<tt class="descname">OtherWriter</tt><big>(</big><em>filename</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.Reader.OtherWriter" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a writer appropriate for <em>filename</em>.</p>
<p>Sets the default keywords <em>start</em>, <em>step</em> and <em>delta</em> (if
available). <em>numatoms</em> is always set from <tt class="xref py py-attr docutils literal"><span class="pre">Reader.numatoms</span></tt>.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#MDAnalysis.coordinates.base.Reader.Writer" title="MDAnalysis.coordinates.base.Reader.Writer"><tt class="xref py py-meth docutils literal"><span class="pre">Reader.Writer()</span></tt></a> and <tt class="xref py py-func docutils literal"><span class="pre">MDAnalysis.Writer()</span></tt></p>
</div>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.base.Reader.Writer">
<tt class="descname">Writer</tt><big>(</big><em>filename</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.Reader.Writer" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a trajectory writer with the same properties as this trajectory.</p>
</dd></dl>

<dl class="attribute">
<dt id="MDAnalysis.coordinates.base.Reader.dt">
<tt class="descname">dt</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.Reader.dt" title="Permalink to this definition">¶</a></dt>
<dd><p>Time between two trajectory frames in picoseconds.</p>
</dd></dl>

<dl class="attribute">
<dt id="MDAnalysis.coordinates.base.Reader.frame">
<tt class="descname">frame</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.Reader.frame" title="Permalink to this definition">¶</a></dt>
<dd><p>Frame number of the current time step.</p>
<p>This is a simple short cut to <tt class="xref py py-attr docutils literal"><span class="pre">Timestep.frame</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.base.Reader.next">
<tt class="descname">next</tt><big>(</big><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.Reader.next" title="Permalink to this definition">¶</a></dt>
<dd><p>Forward one step to next frame.</p>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.base.Reader.rewind">
<tt class="descname">rewind</tt><big>(</big><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.Reader.rewind" title="Permalink to this definition">¶</a></dt>
<dd><p>Position at beginning of trajectory</p>
</dd></dl>

<dl class="attribute">
<dt id="MDAnalysis.coordinates.base.Reader.time">
<tt class="descname">time</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.Reader.time" title="Permalink to this definition">¶</a></dt>
<dd><p>Time of the current frame in MDAnalysis time units (typically ps).</p>
<p>time = <tt class="xref py py-attr docutils literal"><span class="pre">Timestep.frame</span></tt> * <a class="reference internal" href="#MDAnalysis.coordinates.base.Reader.dt" title="MDAnalysis.coordinates.base.Reader.dt"><tt class="xref py py-attr docutils literal"><span class="pre">Reader.dt</span></tt></a></p>
</dd></dl>

<dl class="attribute">
<dt id="MDAnalysis.coordinates.base.Reader.totaltime">
<tt class="descname">totaltime</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.Reader.totaltime" title="Permalink to this definition">¶</a></dt>
<dd><p>Total length of the trajectory numframes * dt.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="MDAnalysis.coordinates.base.ChainReader">
<em class="property">class </em><tt class="descclassname">MDAnalysis.coordinates.base.</tt><tt class="descname">ChainReader</tt><big>(</big><em>filenames</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.ChainReader" title="Permalink to this definition">¶</a></dt>
<dd><p>Reader that concatenates multiple trajectories on the fly.</p>
<p><strong>Known issues</strong></p>
<ul class="simple">
<li>Trajectory API attributes exist but most of them only reflect
the first trajectory in the list; <tt class="xref py py-attr docutils literal"><span class="pre">ChainReader.numframes</span></tt>,
<tt class="xref py py-attr docutils literal"><span class="pre">ChainReader.numatoms</span></tt>, and <tt class="xref py py-attr docutils literal"><span class="pre">ChainReader.fixed</span></tt> are
properly set, though</li>
<li>slicing not implemented</li>
<li><a class="reference internal" href="#MDAnalysis.coordinates.base.ChainReader.time" title="MDAnalysis.coordinates.base.ChainReader.time"><tt class="xref py py-attr docutils literal"><span class="pre">time</span></tt></a> not implemented yet</li>
</ul>
<p>Set up the chain reader.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Arguments :</th><td class="field-body"><dl class="first last docutils">
<dt><em>filenames</em></dt>
<dd><p class="first last">file name or list of file names; the reader will open
all file names and provide frames in the order of
trajectories from the list. Each trajectory must
contain the same number of atoms in the same order
(i.e. they all must belong to the same topology). The trajectory
format is deduced from the extension of <em>filename</em>.</p>
</dd>
<dt><em>skip</em></dt>
<dd><p class="first last">skip step (also passed on to the individual trajectory
readers); must be same for all trajectories</p>
</dd>
<dt><em>kwargs</em></dt>
<dd><p class="first last">all other keyword arguments are passed on to each
trajectory reader unchanged</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="MDAnalysis.coordinates.base.ChainReader.active_reader">
<tt class="descname">active_reader</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.ChainReader.active_reader" title="Permalink to this definition">¶</a></dt>
<dd><p>Reader instance from which frames are being read.</p>
</dd></dl>

<dl class="attribute">
<dt id="MDAnalysis.coordinates.base.ChainReader.frame">
<tt class="descname">frame</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.ChainReader.frame" title="Permalink to this definition">¶</a></dt>
<dd><p>Cumulative frame number of the current time step.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The frame number is 1-based, i.e. the first frame has frame number
1. However, frame indices (used for indexing and slicing with the
<cite>trajectory[frame_index]</cite> notation use a 0-based index, i.e. <em>frame</em>
- 1.</p>
</div>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.base.ChainReader.rewind">
<tt class="descname">rewind</tt><big>(</big><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.ChainReader.rewind" title="Permalink to this definition">¶</a></dt>
<dd><p>Set current frame to the beginning.</p>
</dd></dl>

<dl class="attribute">
<dt id="MDAnalysis.coordinates.base.ChainReader.time">
<tt class="descname">time</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.ChainReader.time" title="Permalink to this definition">¶</a></dt>
<dd><p>Cumulative time of the current frame in MDAnalysis time units (typically ps).</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="MDAnalysis.coordinates.base.Writer">
<em class="property">class </em><tt class="descclassname">MDAnalysis.coordinates.base.</tt><tt class="descname">Writer</tt><a class="headerlink" href="#MDAnalysis.coordinates.base.Writer" title="Permalink to this definition">¶</a></dt>
<dd><p>Base class for trajectory writers.</p>
<p>See Trajectory API definition in <a class="reference internal" href="init.html#module-MDAnalysis.coordinates.__init__" title="MDAnalysis.coordinates.__init__"><tt class="xref py py-mod docutils literal"><span class="pre">MDAnalysis.coordinates.__init__</span></tt></a> for
the required attributes and methods.</p>
<dl class="method">
<dt id="MDAnalysis.coordinates.base.Writer.convert_dimensions_to_unitcell">
<tt class="descname">convert_dimensions_to_unitcell</tt><big>(</big><em>ts</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.Writer.convert_dimensions_to_unitcell" title="Permalink to this definition">¶</a></dt>
<dd><p>Read dimensions from timestep <em>ts</em> and return appropriate unitcell</p>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.base.Writer.has_valid_coordinates">
<tt class="descname">has_valid_coordinates</tt><big>(</big><em>criteria</em>, <em>x</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.Writer.has_valid_coordinates" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <tt class="xref docutils literal"><span class="pre">True</span></tt> if all values are within limit values of their formats.</p>
<p>Due to rounding, the test is asymmetric (and <em>min</em> is supposed to be negative):</p>
<blockquote>
<div>min &lt; x &lt;= max</div></blockquote>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Arguments :</th><td class="field-body"><dl class="first docutils">
<dt><em>criteria</em></dt>
<dd><p class="first last">dictionary containing the <em>max</em> and <em>min</em> values in native units</p>
</dd>
<dt><em>x</em></dt>
<dd><p class="first last"><a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.0.dev-4fb84e7)"><tt class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></tt></a> of <tt class="docutils literal"><span class="pre">(x,</span> <span class="pre">y,</span> <span class="pre">z)</span></tt> coordinates of atoms selected to be written out.</p>
</dd>
</dl>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">boolean</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.base.Writer.write">
<tt class="descname">write</tt><big>(</big><em>obj</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.base.Writer.write" title="Permalink to this definition">¶</a></dt>
<dd><p>Write current timestep, using the supplied <em>obj</em>.</p>
<p>The argument should be a <a class="reference internal" href="../core/AtomGroup.html#MDAnalysis.core.AtomGroup.AtomGroup" title="MDAnalysis.core.AtomGroup.AtomGroup"><tt class="xref py py-class docutils literal"><span class="pre">AtomGroup</span></tt></a> or
a <tt class="xref py py-class docutils literal"><span class="pre">Universe</span></tt> or a <a class="reference internal" href="#MDAnalysis.coordinates.base.Timestep" title="MDAnalysis.coordinates.base.Timestep"><tt class="xref py py-class docutils literal"><span class="pre">Timestep</span></tt></a> instance.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The size of the <em>obj</em> must be the same as the number of atom
provided when setting up the trajectory.</p>
</div>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="core.html" title="5.3. Common functions for coordinate reading — MDAnalysis.coordinates.core"
             >next</a> |</li>
        <li class="right" >
          <a href="init.html" title="5.1. Coordinate/Trajectory Readers and Writers — MDAnalysis.coordinates"
             >previous</a> |</li>
        <li><a href="../../index.html">MDAnalysis v0.7.5-devel documentation</a> &raquo;</li>
          <li><a href="../coordinates_modules.html" >5. Coordinates modules</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2005-2011, Naveen Michaud-Agrawal, Elizabeth J. Denning, Joshua Adelman,
    Christian Beckstein (logo), David Caplan, Jan Domański, Philip Fowler,
    Joseph Goose, Benjamin Hall, Danny Parton, Tyler Reddy, Paul Rigor,
    and Oliver Beckstein.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
    </div>
  </body>
</html>